<?php

class Admin_Dictionary extends Localized   
{
	/**
	 * Название таблицы
	 *
	 * @var string
	 */
	protected $_name = 'dictionary';
	
	protected $localizedFields = array('l_value'=>'value');
	

	public function init()
	{
		
		parent::init();
		
     	$this->addField(array('name'=>'id', 'type'=>'Hidden', 'label'=>'ID', 'grid'=>true, 'anchor'=>'90%', 'width'=>30))
		->addField(array('name'=>'key', 'type'=>'TextField', 'label'=>'Ключ', 'grid'=>true, 'anchor'=>'90%'))
		->addField(array('name'=>'l_value', 'type'=>'TextField', 'label'=>'Значение', 'grid'=>true, 'anchor'=>'90%', 'part'=>'t_localization'));		

		
	}
	
		
	public function getOne($id){
		return $this->getRowByParam($this->e('id=?', $id));
	}
	
}